# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Nikolaus Brandt <sua-aur-661bbb3b@brandt-n.eu>

pkgname=python2-ipaddress
pkgver=1.0.22
pkgrel=1
pkgdesc="IPv4/IPv6 manipulation library"
arch=(any)
url="https://github.com/phihag/ipaddress"
license=('custom:PSF')
depends=('python2')
source=("https://pypi.io/packages/source/i/ipaddress/ipaddress-$pkgver.tar.gz"
        LICENSE)
sha512sums=('b0b0bae50c0819c46554f4ca2d14403a054d73cb9df7efd8bde03bd32b7599510a0e8eb7a63bd7cc6af45a035a0fcce38058b0625732472c7f252f72b88a6084'
            '5cc59a125412b0eb35f05d40756db050805fc1bd5729f350796644ad92b8117f8d3ed3c7cf6ab8b072518706bf95a1d40f016d065726a1296e19ea09582ec385')

check() {
  # Not included in release tarball
  cd ipaddress-$pkgver
  # python2 test_ipaddress.py
}

package() {
  cd ipaddress-$pkgver
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
